import request from '../utils/request'

const area = '/AppAPI_My'

export const index = (params) => {
  return request({
    url: `${area}/Index`,
    method: 'get',
    params
  })
}
export const address = (params) => {
  return request({
    url: `${area}/Address`,
    method: 'get',
    params
  })
}
export const addressEdit = (data) => {
  return request({
    url: `${area}/Address_Edit`,
    method: 'post',
    data
  })
}
export const setDefault = (data) => {
  return request({
    url: `${area}/Address_SetDefault`,
    method: 'post',
    data
  })
}
export const addressDelete = (data) => {
  return request({
    url: `${area}/Address_Delete`,
    method: 'post',
    data
  })
}
export const member = (data) => {
  return request({
    url: `${area}/MemberOrder_Create`,
    method: 'post',
    data
  })
}
export const coupon = (params) => {
  return request({
    url: `${area}/Coupon`,
    method: 'get',
    params
  })
}
export const recomMember = (params) => {
  return request({
    url: `${area}/RecomMember`,
    method: 'get',
    params
  })
}

export const checkToken = () => {
  return request({
    url: '/MPWeixin/CheckToken',
    method: 'get'
  })
}
